package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.ActivityAward;
import com.sc.nft.entity.UserReward;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * (UserReward)表数据库访问层
 *
 * @author 张超
 * @since 2024-06-05 15:34:01
 */
@Mapper
public interface UserRewardMapper extends BaseMapper<UserReward> {

    /**
     * 根据签到活动Id获取已发放奖励
     * @param activityBasicsId
     * @return
     */
    Long equityCount(@Param("activityBasicsId") Long activityBasicsId);

    /**
     * 获取用户已发放奖励次数
     * @param rewardByActivityId
     * @param userId
     * @return
     */
    Integer getUserRewardByRewardAllocationId(@Param("rewardByActivityId") Long rewardByActivityId,@Param("userId")Long userId);
}
